package com.kcsoft.welcome.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.kcsoft.welcome.mapper.PfenceMapper;
import com.kcsoft.welcome.pojo.PageBean;
import com.kcsoft.welcome.pojo.Pfence;
import com.kcsoft.welcome.service.PfenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

@Service
public class PfenceServiceImpl implements PfenceService {

    @Autowired
    PfenceMapper pfenceMapper;

    @Override
    public void add(Pfence pf) {
        pfenceMapper.add(pf);
    }

    @Override
    public List<Pfence> list(LocalDate date) {

       return pfenceMapper.list(date);

    }

    @Override
    public void update(Integer id, Integer pf) {
        pfenceMapper.udpate(id, pf);
    }

    @Override
    public void delete(Integer id) {
        pfenceMapper.delete(id);
    }

    @Override
    public List<LocalDate> dates() {
        return pfenceMapper.dates();
    }
}
